<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
	<!--html提供了一个标签，script-->
	<script>
		var a = '123';
		console.log(typeof a);
		//把字符转化为整数类型(number)
		//parseInt()
		var b = parseInt(a);
		console.log(typeof b);
		//console.log(typeof parseInt(a));

		var c = '123.987';
		console.log(parseInt(c)); //123
		console.log(typeof parseInt(c));

		var d = '123.22哈哈';
		console.log(parseInt(d)); //123

		var e = '哈123.22';
		console.log(parseInt(e)); //?
		console.log(typeof NaN);
	</script>
 </head>
 <body>
  
 </body>
</html>
